<template>
		<!-- 菜单 -->
		<view class="goods_menu">
			<view class="menu_card" v-for="(item,index) in menus" :key="item.id" @click="toPage(item.url)">
				<image :src="item.img"  ></image>
				<view class="menu_name" >{{item.name}}</view>
			</view>
		</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		props: {
			menus: {
				type: Array,
				default: []
			},
		},
		methods:{
				toPage(val) {
					uni.navigateTo({
						url: val
					})
				},
				backPage() {
					uni.navigateBack({
						delta: 1
					})
				},
		}
	};
</script>

<style scoped lang="scss">
		.goods_menu {
			border-radius: 16rpx;
			margin: 16rpx 0 16rpx 0;
			padding: 40rpx 44rpx 32rpx 32rpx;
			display: flex;
			justify-content: space-between;
			background-color: #fff;
			align-items: center;
		
			.menu_card {
				width: 25%;
				text-align: center;
				display: flex;
				flex-direction: column;
				align-items: center;
		
				image {
		
					width: 64rpx;
					height: 64rpx;
				}
		
				.menu_name {
					padding-top: 16rpx;
					font-size: 24rpx;
					line-height: 24rpx;
				}
			}
		}
</style>